package com.terrace.db.system.service;

import com.terrace.core.mybatis.entity.Pagination;
import com.terrace.db.system.mapper.entity.DataSource;

/**
 * 数据源Service
 * 
 * @author jiangyg
 *
 */
public interface DataSourceService {

	/**
	 * 新增数据源
	 * 
	 * @param dataSource
	 * @return
	 */
	public int insertDataSourceSelective(DataSource dataSource);

	/**
	 * 删除数据源
	 * 
	 * @param dbName
	 * @return
	 */
	public int deleteDataSourceByName(String dbName);

	/**
	 * 修改数据源
	 * 
	 * @param dataSource
	 * @return
	 */
	public int updateDataSourceByNameSelective(DataSource dataSource);

	/**
	 * 查询数据源
	 * 
	 * @param dbName
	 * @return
	 */
	public DataSource selectDataSourceByName(String dbName);

	/**
	 * 分页查询
	 * 
	 * @param pagination
	 * @param dataSource
	 * @return
	 */
	public Pagination<DataSource> selectDataSourceForPagination(Pagination<DataSource> pagination, DataSource dataSource);

}
